<div class="page" id="profile">
	<?php if($this->view->func == 'password') { ?>
		<h3><a href="profile" data-to="ajax">Profile</a> / Change password</h3>
		<span class="advice">Hello <?php echo $this->view->data['name']; ?>, you can change your password using the form below.</span>
		<?php echo $this->partial('helpers/avatar.php', array(
			'size' => 110,
			'user' => array(
				'id' => $this->view->data['id'],
				'link' => $this->view->data['link'],
				'name' => $this->view->data['name'],
				'avatar' => $this->view->data['avatar']
			)
		)); ?>
		<div class="panel">
			<h4>New Password</h4>
			<form id="form_password" autocomplete="off">
				<label class="input">
					<input type="password" value="" name="old" maxlength="30">
					<span>Old Password</span>
				</label>
				<label class="input">
					<input type="password" value="" name="password" maxlength="30">
					<span>New Password</span>
				</label>
				<label class="input">
					<input type="password" value="" name="confirm" maxlength="30">
					<span>Confirm Password</span>
				</label>
				<div class="right"><button type="submit">Change Password</button></div>
				<div class="clear"></div>
			</form>
		</div>
		<div class="clear"></div>
	<?php } else { ?>
		<?php if($this->view->func == 'index') { ?>
			<h3>Profile</h3>
			<span class="advice">Welcome to your profile. You can view your details here and change your password.</span>
		<?php } else { ?>
			<h3><a href="roster" data-to="ajax">Roster</a> / <?php echo $this->view->data['name']; ?></h3>
			<span class="advice">You're looking at the profile of one of our <?php echo $this->settings['blizz_guild']; ?>&trade; brotherhood member!</span>
		<?php } ?>
		<?php echo $this->partial('helpers/avatar.php', array(
			'size' => 110,
			'user' => array(
				'id' => $this->view->data['id'],
				'link' => $this->view->data['link'],
				'name' => $this->view->data['name'],
				'avatar' => $this->view->data['avatar']
			)
		)); ?>
		<div class="panel">
			<div class="left">
				<h4>Character <span><?php echo $this->view->data['name']; ?></span></h4>
				<h4>Rank <span><?php echo $this->view->data['rank']; ?></span></h4>
			</div>
			<div class="left">
				<h4>E-mail <span class="matrix" data-key="<?php echo $this->view->data['matrix']['key']; ?>" data-code="<?php echo $this->view->data['matrix']['code']; ?>">Decrypting...</span></h4>
				<h4>Activity <span><?php echo ($this->view->data['topics'] . ($this->view->data['topics'] == 1 ? ' Topic' : ' Topics')) . ', ' . ($this->view->data['replies'] . ($this->view->data['replies'] == 1 ? ' Reply' : ' Replies')); ?></span></h4>
			</div>
			<div class="clear"></div>
			<h4>Tracking <span id="location" data-id="<?php echo $this->view->data['id']; ?>">Locating...</span></h4>
			<?php if($this->view->func == 'index') { ?>
				<div class="delimiter"></div>
				<form class="profile_handlers">
					<div class="left"><button data-handle="password">Change Password</button></div>
					<div class="left">&nbsp;&nbsp;<button data-handle="logout" data-link="<?php echo $this->view->data['link']; ?>">Logout</button></div>
					<div class="clear"></div>
				</form>
			<?php } ?>
		</div>
		<div class="clear"></div>
	<?php } ?>
</div>